package cn.lgwen.candy.runtime.core;

import cn.lgwen.candy.runtime.operator.SourceOperator;

/**
 * 2019/12/24
 * aven.wu
 * danxieai258@163.com
 * 定义任务
 */
public interface Environment {

    default Environment createEnvironment() {
        return new EnvironmentImpl().create();
    }
    <O> Stream<O> addSource(SourceOperator<O> sourceOperator);

    /**
     * start job and exit util all task is finish
     * @throws Exception
     */
    void executor() throws Exception;

    Graph createGraph();


}
